#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
    short a=0;
    scanf("%hd", &a);
    short c = 5;
   short b = a % c;
    if (b == 0) {
        printf("YES");
    }
    else {
        printf("NO");
    }
    return 0;
}















